<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>职工</title>
    <%@ include file="/WEB-INF/views/commons/common.jsp"%>
    <script type="text/javascript" src="/static/js/system/staff.js"></script>
</head>
<body>
    <%--数据表格--%>
    <table id="staff_datagrid" fit="true"></table>

    <%--表格工具栏--%>
    <div id="tb">
        <a href="JavaScript:;" class="easyui-linkbutton" data-options="iconCls:'icon-add',plain:true" data-cmd="add">添加</a>
        <a href="JavaScript:;" class="easyui-linkbutton" data-options="iconCls:'icon-edit',plain:true" data-cmd="edit">编辑</a>
        <a href="JavaScript:;" class="easyui-linkbutton" data-options="iconCls:'icon-reload',plain:true" data-cmd="reload">刷新</a>
        <div>
            工号/姓名:<input type="text" name ="keyword" id="keyword">
            聘用类型:<input class="easyui-combobox" name="hiretypeId" id="hiretype"
                        data-options="
                            editable:false,
                            url:'/dictionaryItem/getDictionaryItemByParentName.do?content=' + '聘用类型',
                            valueField:'id',
                            textField:'name',
                            panelHeight:'auto'
                        "/>
            职务:<input class="easyui-combobox" name="dutyId" id="duty"
                      data-options="
                            editable:false,
                            url:'/dictionaryItem/getDictionaryItemByParentName.do?content=' + '职务',
                            valueField:'id',
                            textField:'name',
                            panelHeight:'auto'
                        "/>
            学历:<input class="easyui-combobox" name="studyeffortId" id="studyeffort" data-options="
                            editable:false,
                            url:'/dictionaryItem/getDictionaryItemByParentName.do?content='+'学历',
                                valueField: 'id',
                                textField: 'name',
                                panelHeight:'auto'
                              " />
            <a href="javascript:;" class="easyui-linkbutton" data-cmd="searchT" data-options="iconCls:'icon-search',plain:true">查询</a>
        </div>
    </div>

    <%--添加和编辑弹窗--%>
    <div id="edit_dialog" align="center">
        <div id="edit_tabs" class="easyui-tabs" fit="true" border="false">
            <div title="基本信息" style="padding:20px;display:none;">
                <form id="edit_form" method="post" enctype="multipart/form-data">
                    <input type="hidden" id="staffId" name="id">
                    <table align="center" style="margin-top: 20px;
                border-collapse:separate; border-spacing:0px 10px;">
                        <tr>
                            <td>职工名称:</td>
                            <td><input class="easyui-textbox" name="username" data-options="required:true"/></td>
                            <td>所属部门:</td>
                            <td><input class="easyui-combobox" name="dept.id"data-options="required:true,
                                editable:false,
                                url:'/department/listData.do',
                                valueField:'id',
                                textField:'name',
                                panelHeight:'auto'"/>
                            </td>
                            <td>性别:</td>
                            <td><input class="easyui-combobox" name="gender.id"
                                       data-options="
                                editable:false,
                                url:'/dictionaryItem/getDictionaryItemByParentName.do?content='+'性别',
                                valueField: 'id',
                                textField: 'name',
                                panelHeight:'auto'"/>
                            </td>
                        </tr>
                        <tr>
                            <td>年龄:</td>
                            <td><input class="easyui-textbox" name="age"/></td>
                            <td>学历:</td>
                            <td><input class="easyui-combobox" name="studyeffort.id" data-options="
                                editable:false,
                                url:'/dictionaryItem/getDictionaryItemByParentName.do?content='+'学历',
                                valueField: 'id',
                                textField: 'name',
                                panelHeight:'auto'"/>
                            </td>
                            <td>祖籍:</td>
                            <td><input class="easyui-textbox" name="family"/></td>
                        <tr>
                            <td>出生年月:</td>
                            <td><input class="easyui-datebox" name="borndate"/></td>
                            <td>政治面貌:</td>
                            <td><input class="easyui-combobox" name="political.id" data-options="
                                editable:false,
                                required:true,
                                url:'/dictionaryItem/getDictionaryItemByParentName.do?content=' + '政治面貌',
                                valueField:'id',
                                textField:'name',
                                panelHeight:'auto'"/>
                            </td>
                            <td>联系电话:</td>
                            <td><input class="easyui-textbox" name="tel" data-options="required:true"/></td>
                        </tr>
                        <tr>
                            <td>入职日期:</td>
                            <td><input class="easyui-datebox" name="hiredate" data-options="required:true"/></td>
                            <td>工龄:</td>
                            <td><input class="easyui-textbox" name="seniroity"/></td>
                            <td>婚姻状况:</td>
                            <td><input class="easyui-combobox" name="marriage.id"
                                       data-options="
                                editable:false,
                                url:'/dictionaryItem/getDictionaryItemByParentName.do?content=' + '婚姻状况',
                                valueField:'id',
                                textField:'name',
                                panelHeight:'auto'"/>
                            </td>
                        </tr>
                        <tr>
                            <td>状态:</td>
                            <td><input class="easyui-combobox" name="state"
                                       data-options="
                               editable:false,
                               required:true,
                               valueField: 'id',
                               textField: 'name',
                               data: [{
                                    id: '0',
                                    name: '在职'
                               },{
                                    id: '1',
                                    name: '离职'
                               }],
                               panelHeight:'auto'"/>
                            </td>
                            <td>超级管理员:</td>
                            <td><input class="easyui-combobox" name="admin"data-options="
                               editable:false,
                               required:true,
                               valueField: 'id',
                               textField: 'name',
                               data: [{
                                    id: '1',
                                    name: '是'
                                },{
                                    id: '0',
                                    name: '否'
                                }],
                               panelHeight:'auto'"/>
                            </td>
                            <td>职务:</td>
                            <td><input class="easyui-combobox" name="duty.id"
                                       data-options="
                               editable:false,
                               required:true,
                               url:'/dictionaryItem/getDictionaryItemByParentName.do?content=' + '职务',
                               valueField:'id',
                               textField:'name',
                               panelHeight:'auto'"/>
                            </td>
                        </tr>
                        <tr>
                            <td>聘用类型:</td>
                            <td><input class="easyui-combobox" name="hiretype.id"
                                       data-options="
                               editable:false,
                               url:'/dictionaryItem/getDictionaryItemByParentName.do?content=' + '聘用类型',
                               valueField:'id',
                               textField:'name',
                               panelHeight:'auto'"/>
                            </td>
                            <td>考勤卡号:</td>
                            <td><input class="easyui-textbox" name="timecard" data-options="required:true"/></td>
                            <td>身份证号:</td>
                            <td><input class="easyui-textbox" name="idcard" data-options="required:true"/></td>
                        </tr>
                        <tr>
                            <td>工号:</td>
                            <td><input class="easyui-textbox" name="jobnumber" data-options="required:true"/></td>
                        </tr>

                        <tr>
                            <td>一寸光头照</td>
                            <td>
                                <input style="width:160px" name="pic" type="file">
                            </td>
                            <td></td>
                            <td>
                                <img src="" id="imgId" style="width:120px" height="100px"/>
                            </td>
                        </tr>
                    </table>
                </form>
            </div>
        </div>
    </div>
    <%--弹窗底部按钮--%>

    <div id="bb">
        <a href="JavaScript:;" class="easyui-linkbutton" iconCls="icon-save" data-cmd="save">保存</a>
        <a href="JavaScript:;" class="easyui-linkbutton" iconCls="icon-cancel" data-cmd="cancel">关闭</a>
    </div>

</body>
</html>
